<template>
  <div class="container">
    <div class="info">
      <div class="title">病毒信息</div>
      <p>病毒：SARS-CoV-2,其导致疾病命名 COVID-19</p>
      <p>今日高风险地区：{{ covInof.highDangerCount }} 处</p>
      <p>今日中风险地区：{{ covInof.midDangerCount }} 处</p>
      <!-- <p></p> -->
    </div>
    <div class="hot">
      <div class="title">
        疫情热点
        <a class="more" href="#">查看更多></a>
      </div>
      <ul class="list">
        <li v-for="item in news" :key="item.id" class="item">
          <span class="newest">最新 </span>
          {{ item.title }}
          <a class="newMore" href="">></a>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    covInof: {
      type: Object,
      default: function () {
        return {};
      },
    },
    news: {
      type: Array,
      default: function () {
        return [];
      },
    },
  },
};
</script>

<style scoped>
.container {
  padding: 0.25rem;
}
.title {
  border-left: 10px solid rgb(6, 6, 231);
  padding-left: 5px;
  color: #666;
  font-size: x-large;
  font-weight: 900;
}
.container > p {
  color: #666;
  line-height: 20px;
}
.list {
  list-style: none;
  padding: 0;
}
.list > .item {
  line-height: 30px;
  color: #666;
}
.more {
  float: right;
  overflow: hidden;
  font-size: large;
  text-decoration: none; /* 去除默认的下划线 */
  outline: none; /* 去除旧版浏览器的点击后的外虚线框 */
  color: rgb(6, 6, 231);
}
.newMore {
  float: right;
  overflow: hidden;
  font-size: large;
  text-decoration: none; /* 去除默认的下划线 */
  outline: none;
  color: #666;
}
.newest {
  font-size: medium;
  background-color: orangered;
  color: white;
  border-radius: 3px;
  padding-left: 3px;
}
</style>
